<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<h4>if-else 语句</h4>
		<script type="text/javascript">
			defen = 60;
			
			if (defen>=80) {
				document.write('成绩a')
			} else if(defen>=60){
				document.write('成绩b')
			} else{
				document.write('成绩c')
			}
		</script>
		<hr />
		<!--************************************************************************-->
		<h4>switch-case break default 语句</h4>
		<script type="text/javascript">
			week = 4;
			
			switch(week){
				case 1:
					document.write('周一');
					break;
				case 2:
					document.write('周二');
					break;
				case 3:
					document.write('周三');
					break;
				case 4:
					document.write('周四');
					break;
				case 5:
					document.write('周五');
					break;
				case 6:
					document.write('周六');
					break;
				default:           /*default 上面情况都不对时*/
					document.write('周日');
					break;
					
			}
			
		</script>
		
		<h4></h4>
	</body>
</html>
